package com.hb.core.pojo.enums;

/**
 * @author yyx
 * @data 2022/5/16
 * @desc 询标状态
 */
public enum InquiryStatusEnum {
    NO_SENT(1, "待发送"),
    SENTED(2, "已发送"),
    NO_HANDLE(3, "未处理"),
    ;

    private final int code;

    private final String name;

    InquiryStatusEnum(final int code, final String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static String codeOf(final Integer code) {
        for (final InquiryStatusEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value.getName();
            }
        }
        return "";
    }
}
